<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>css3加载进度条</title>
    <style>
        .loading {
            position: absolute;
            top: 0;
            left: 0;
            z-index: 100;
            background-color: yellow;
            width: 100%;
            height: 100%;
        }

        .load {
            width: 200px;
            height: 200px;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-top: -100px;
            margin-left: -100px;
            border: 1px solid red;
        }

        .load i {
            display: inline-block;
            width: 20px;
            height: 200px;
            background-color: blue;
            margin-left: 13px;
            transform: scaleY(.4);
            animation: loading 1s infinite;
        }

        @keyframes loading {
            0%, 100% {
                transform: scaleY(0.4);
            }

            50% {
                transform: scaleY(1);
            }
        }

        .load i:nth-child(2) {
            animation-delay: 0.1s;
        }

        .load i:nth-child(3) {
            animation-delay: 0.3s;
        }

        .load i:nth-child(4) {
            animation-delay: 0.5s;
        }

        .load i:nth-child(5) {
            animation-delay: 0.7s;
        }
    </style>
    <script>

        document.onreadystatechange = function () {
            window.onload = function () {
                var loading = document.getElementsByClassName('loading')

                if (document.readyState == "complete") {
                    loading[0].style.display = 'none'

                }

            }

        }


    </script>
</head>
<body>

<div class="loading" id="loading">
    <div class="load">
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
    </div>
</div>
<img src="http://f.hiphotos.baidu.com/image/pic/item/503d269759ee3d6db032f61b48166d224e4ade6e.jpg" alt="">
<img src="http://g.hiphotos.baidu.com/image/pic/item/c8ea15ce36d3d539f09733493187e950342ab095.jpg" alt="">
<img src="http://a.hiphotos.baidu.com/image/pic/item/d6ca7bcb0a46f21f46612acbfd246b600d33aed5.jpg" alt="">
<img src="http://c.hiphotos.baidu.com/image/h%3D300/sign=6d0bf83bda00baa1a52c41bb7711b9b1/0b55b319ebc4b745b19f82c1c4fc1e178b8215d9.jpg"
     alt="">

</body>
</html>